{template header}
{if $TS_APP[options][isregister]=='2'}
{else}
<script language="javascript">
$(document).ready(function(){
	$(".subform").Validform({
		btnSubmit:"#btnsub", 
		btnReset:".btnreset",
		tiptype:3,
	});
});
</script>

{/if}

<div class="midder">
<div class="mc">

<div class="bbox mh400">

<h1>用户注册</h1>

<div class="cleft">

{if $TS_APP[options][isregister]=='2'}
<p>系统升级中，暂时关闭用户注册！</p>
<p><a href="{SITE_URL}">返回首页</a></p>
{else}
<p></p>
<form class="subform" method="POST" action="{tsUrl('user','register',array('ts'=>'do'))}">

<table class="commtable" width="100%" border="0" cellspacing="0" cellpadding="0">

{if $TS_SITE['base']['isinvite']=='1'}
<tr>
<th>
<font color="red">邀请码:</font></th>
<td><input name="invitecode" type="text" /></td>
</tr>
{/if}


<tr>
<th>Email:</th>
<td><input name="email" type="text" datatype="e" ajaxurl="{SITE_URL}index.php?app=user&ac=check&ts=inemail"  /></td>
</tr>
<tr>
<th>密码：</th>
<td><input type="password" name="pwd"  datatype="*6-16"  /></td>
</tr>
<tr>
<th>重复密码：</th>
<td><input type="password" name="repwd"  datatype="*" recheck="pwd" /></td>
</tr>

<tr>
<th>用户名：</th>
<td><input type="text" name="username" datatype="s2-18" ajaxurl="{SITE_URL}index.php?app=user&ac=check&ts=isusername" /></td>
</tr>

{if $TS_SITE['base']['isauthcode']}
<tr><th>验证码：</th><td><input name="authcode" datatype="*" ajaxurl="{SITE_URL}index.php?app=user&ac=check&ts=code" />
 </td>
</tr>
<tr><th></th><td><img align="absmiddle" src="{tsUrl('pubs','code')}" onclick="javascript:newgdcode(this,this.src);" title="点击刷新验证码" alt="点击刷新验证码" style="cursor:pointer;"/></td></tr>
{/if}

<tr>
<th></th>
<td>
<input type="hidden" name="fuserid" value="{$fuserid}" />
<input type="hidden" name="token" value="{$_SESSION['token']}" />
<button id="btnsub" class="btn btn-success btn-large" type="submit">注册</button>

<a href="{tsUrl('user','login')}">登陆</a></td>
</tr>

</table>
</form>
{/if}
</div>

<div class="cright">

<div class="bc">
{php doAction('user_register_footer')}
</div>

</div>


</div>

</div>
</div>
{template footer}